import java.io.*;
import java.nio.*;
import java.nio.channels.*;
import java.nio.charset.*;
import java.net.*;
import java.util.*;

/**
 * UserInputHandler
 * Threaded class used to handle user terminal input over a drop
 * @author James Varvaro
 */
public class UserInputHandler extends Thread {
    private Drop drop;
    
    public UserInputHandler(Drop aDrop) {
        this.drop = aDrop;
    }
    
    public void run() {
        BufferedReader in = null;
        in = new BufferedReader(
                new InputStreamReader(System.in));
        String inputLine = "";
        System.out.println("type");
        try {
            while((inputLine = in.readLine()) != null) {
                //System.out.println("whwhw");
                drop.put(inputLine);
            }
        }
        catch(IOException ex) {
            System.out.println("Couldn't receive input.");
        }
    }
}
